<div class="row-fluid">
    <div class="navbar no-margin">
        <div class="navbar-inner">
            <ul class="breadcrumb">
                <i class="icon-chevron-left hide-sidebar"><a href='#' title="Hide Sidebar" rel='tooltip'>&nbsp;</a></i>
                <i class="icon-chevron-right show-sidebar" style="display:none;"><a href='#' title="Show Sidebar"
                                                                                    rel='tooltip'>&nbsp;</a></i>
                <li>
                    <a href="#/onduty">首页</a>
                </li>
                <li>
                    <a href="#/star/user/permission">功能管理</a>
                </li>
                <li class="active">功能配置</li>
            </ul>
        </div>
    </div>
</div>

<div class="container-fluid">

    <div class="row">
        <div class="col-sm-12 col-md-12 main">
            <div class="col-md-6 col-md-offset-3">
<!--                <form name="form" ng-keydown="if(event.keyCode==13) return false;" ng-submit="form.$valid&&olapConfigAdd()" novalidate>-->
                <form name="form" novalidate>
                    <div class="form-group"
                         ng-class="{'has-error':form.functionName.$error.required,'has-success':!form.functionName.$error.required}">
                        <label style="padding: 0 0 5px">功能名称</label>
                        <!--                        <input type="text" class="form-control" name="resolvegroupId" ng-model="vm.p.resolvegroupId"/>-->
                        <input type="text" class="form-control" name="functionName" ng-model="vm.p.functionName" required/>
                        <span ng-show="form.functionName.$error.required" class="help-block">请填写功能名称</span>
                    </div>

                    <div class="form-group"
                         ng-class="{'has-error':form.functionItem.$error.required,'has-success':!form.functionItem.$error.required}">
                        <label style="padding: 0 0 5px">功能路径（页面路径或API路径）</label>
                        <!--                        <input type="text" class="form-control" name="resolvegroupId" ng-model="vm.p.resolvegroupId"/>-->
                        <input type="text" class="form-control" name="functionItem" ng-model="vm.p.functionItem" required/>
                        <span ng-show="form.functionItem.$error.required" class="help-block">请填写功能项</span>
                    </div>

                    <div class="form-group"
                         ng-class="{'has-error':form.functionLabel.$error.required,'has-success':!form.functionLabel.$error.required}">
                        <label style="padding: 0 0 5px">权限标签（权限管控唯一标识码）</label>
                        <!--                        <input type="text" class="form-control" name="resolvegroupId" ng-model="vm.p.resolvegroupId"/>-->
                        <input type="text" class="form-control" name="functionLabel" ng-model="vm.p.functionLabel" required/>
                        <span ng-show="form.functionLabel.$error.required" class="help-block">请填写权限标签</span>
                    </div>
<!--                    <div class="form-group" ng-class="{'has-error':form.ctiId.$error.required,'has-success':!form.ctiId.$error.required}">-->
<!--                        <label style="padding: 0 0 5px">支持项</label>-->
<!--                        &lt;!&ndash;                        <input type="text" class="form-control" name="ctiId" ng-model="vm.p.ctiId"/>&ndash;&gt;-->
<!--                        <select ng-disabled="vm.isDisabled" required name="ctiId" ng-model="vm.p.ctiId" ng-options="x as y.ctiName for (x,y) in ctis" class="form-control"></select>-->
<!--                        <span ng-show="form.ctiId.$error.required" class="help-block">请选择支持项</span>-->
<!--                    </div>-->
                    <div class="form-group" ng-class="{'has-error':form.permissionType.$error.required,'has-success':!form.permissionType.$error.required}">
                        <label style="padding: 0 0 5px">权限类型（页面/接口）</label>
                        <!--                        <input type="text" class="form-control" name="ctiId" ng-model="vm.p.ctiId"/>-->
                        <select required name="permissionType" ng-model="vm.p.permissionType" ng-options="x as y for (x,y) in permissionTypeData" class="form-control"></select>
                        <span ng-show="form.permissionType.$error.required" class="help-block">请选择权限类型</span>
                    </div>
                    <div class="form-group"
                         ng-class="{'has-error':form.ownerId.$error.required,'has-success':!form.ownerId.$error.required}">
                        <label style="padding: 0 0 5px">负责人</label>
                        <!--                        <input type="text" class="form-control" name="resolvegroupId" ng-model="vm.p.resolvegroupId"/>-->
                        <input type="text" class="form-control" name="ownerId" ng-model="vm.p.ownerId" required/>
                        <span ng-show="form.ownerId.$error.required" class="help-block">请填写负责人</span>
                    </div>

                    <div class="form-group">
                        <input class="btn btn-primary" ng-class="{'disabled':!form.$valid}"
                               type="button" value="确定" ng-click="form.$valid&&permissionSave()"/>
                        <a href="#/star/user/permission" class="btn btn-default">返回</a>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div><!--/.container-->
<script type="text/javascript" charset="UTF-8" src="../lib/bootstrap/js/bootstrap-tagsinput.js"></script>
<script type="text/javascript" charset="UTF-8" src="../lib/bootstrap/js/bootstrap-tagsinput-angular.js"></script>